Skip to main content

VideoNode Class

Description:

  A class for creating VideoNode objects.

The Web dora-preset supports Ogg/Theora video with embedded Vorbis audio. Enable VIDEO explicitly for core builds. Video decoding runs on the logic loop without requiring pthreads or SharedArrayBuffer. Audio playback follows browser user-gesture requirements.

__call​

Type: Metamethod.

Description:

  The constructor function for creating a VideoNode instance.

Signature:

metamethod __call: function(
self: VideoNodeClass,
filename: string,
looped?: boolean --[[false]]
): VideoNode | nil

Parameters:

ParameterTypeDescription
filenamestringThe path to an Ogg (.ogv) file containing a Theora video stream. VideoNode reads it through Dora Content, decodes Theora 4:2:0/4:2:2/4:4:4 in software, and automatically plays an embedded Vorbis track with synchronized pause, resume, and looping.
loopedboolean[optional] Whether the video should loop. Default is false.

Returns:

Return TypeDescription
VideoNode | nilThe created VideoNode instance. If creation fails, returns nil.